refresh page in next js

97

refresh page in next js -

import { useRouter } from 'next/router'

//...

const router = useRouter()

router.reload(window.location.pathname)

link in next js is refresh page -

<Link href="/shop/[pid]" as={`/shop/${id}`}>
	<a>Shop by menu</a>
</Link>

Comments

Submit
0 Comments